package cn.tedu.spring.eg111;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class Product {
    @Value("1")
    private int id;
    private String title;
    private String comment;

    public Product() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }
@Value("没有白练的")
    public void setTitle(String title) {
        this.title = title;
    }

    public String getComment() {
        return comment;
    }
@Value("你说的太对了")
    public void setComment(String comment) {
        this.comment = comment;
    }

    @Override
    public String toString() {
        return "Product{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", comment='" + comment + '\'' +
                '}';
    }
}
